package com.lzq.ribbon.Controller;

import com.lzq.ribbon.Stream.StreamClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MessageController {

    @Autowired
    private StreamClient streamClient;


    @GetMapping("/send")
    public String send(){
        streamClient.Output().send(MessageBuilder.withPayload("helloWorld!!!").build());
        return "消息发送成功";
    }

}
